package org.offsync

import java.nio.channels.ServerSocketChannel
import java.nio.channels.SocketChannel

package object rich {
  implicit def enrich(selector: java.nio.channels.Selector) = RichSelector(selector)
  implicit def enrich[T](selector: java.util.Iterator[T]) = RichIterator[T](selector)
  implicit def enrich[T](closeable: T { def close(): Unit }) = RichCloseable[T](closeable)
  implicit def enrich2ServerSocketChannel(serverSocketChannel: ServerSocketChannel) = RichServerSocketChannel(serverSocketChannel)
  implicit def enrich2SocketChannel(socketChannel: SocketChannel) = new RichSocketChannel(socketChannel)
}
